#!/bin/bash

Hostname="localhost"
Username="xkdichan"
Password="15935700"

#多个数据库写成一个数组,空格隔开
DBname=("tourist")

#创建数据库
for dbn in ${DBname[*]};do
	create_db_sql="create database IF NOT EXISTs ${dbn}"
	mysql -h${Hostname} -u${Username} -p${Password} -e"${create_db_sql}"
done
